<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <script>

        // 正则的修饰符
        //   i   ignore忽视大小写
        //   g   global全局匹配   ？？？？

        // 修饰符可以同时使用，不分先后

        var reg = /good/ig;
        console.log(reg.test('Good'));


        var reg2 = new RegExp('good', 'gi');


    </script>

</body>

</html>